/*
#
#  Copyright 2011 Matthew Jannace
#
#  This file is part of RoboCode BlackHoleAgent
#
#  RoboCode BlackHoleAgent is free software: you can redistribute it and/or
#  modify it under the terms of the GNU General Public License as
#  published by the Free Software Foundation, either version 3 of the
#  License, or (at your option) any later version.
#
#  RoboCode BlackHoleAgent is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
#  General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with RoboCode BlackHoleAgent. If not, see
#  <http://www.gnu.org/licenses/>.
#
 */
package com.jannaceltd.TeamBlackHoleBeer.Modules.HelperClasses;

import java.awt.geom.Point2D;
import java.io.Serializable;

/**
 * Class to store Enemy Robot Information
 * @author Matthew Jannace <mjannace@gmail.com>
 * @version 1.0
 */
public class Enemy extends Robots implements Serializable {

    private static final long serialVersionUID = 5890963822395906392L;

    /**
     * Creates an Enemy Object
     */
    public Enemy() {
        this.name = "";
        this.energy = 0.0;
        this.alive = true;
        this.pos = new Point2D.Double();
        this.bearing = 0.0;
        this.heading = 0.0;
        this.velocity = 0.0;
        this.distance = 0.0;
        this.changehead = 0.0;
        this.ctime = 0L;
    }

    /**
     * Creates an Enemy Object
     * @param name
     * @param energy
     * @param alive
     * @param pos
     * @param bearing
     * @param heading
     * @param velocity
     * @param distance
     * @param changehead
     * @param ctime
     */
    public Enemy(
            String name,
            double energy,
            boolean alive,
            Point2D.Double pos,
            double bearing,
            double heading,
            double velocity,
            double distance,
            double changehead,
            long ctime) {
        this.name = name;
        this.energy = energy;
        this.alive = alive;
        this.pos = new Point2D.Double(pos.getX(), pos.getY());
        this.bearing = bearing;
        this.heading = heading;
        this.velocity = velocity;
        this.distance = distance;
        this.changehead = changehead;
        this.ctime = ctime;
    }

    /**
     * Returns String representing the object
     * @return String Name and XY locations
     */
    @Override
    public String toString() {
        return "Name = " + name
                + ", X = " + pos.x
                + ", Y = " + pos.y;
    }
}
